package com.tupi.project.di.module;


import com.tupi.project.base.App;
import com.tupi.project.component.PreferencesHelper;
import com.tupi.project.component.PreferencesHelperInf;
import com.tupi.project.http.HttpApiInf;
import com.tupi.project.http.HttpHelper;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by codeest on 16/8/7.
 */

@Module
public class AppModule {
    private final App application;

    public AppModule(App application) {
        this.application = application;
    }
 
    @Provides
    @Singleton
    App provideApplicationContext() {
        return application;
    }

    @Provides
    @Singleton
    HttpApiInf provideHttpHelper(HttpHelper httpHelper) {
        return httpHelper;
    }

//    @Provides
//    @Singleton
//    DBHelper provideDBHelper(RealmHelper realmHelper) {
//        return realmHelper;
//    }
//
    @Provides
    @Singleton
    PreferencesHelperInf providePreferencesHelper(PreferencesHelper implPreferencesHelper) {
        return implPreferencesHelper;
    }
//
//    @Provides
//    @Singleton
//    DataManager provideDataManager(HttpHelper httpHelper, DBHelper DBHelper, PreferencesHelper preferencesHelper) {
//        return new DataManager(httpHelper, DBHelper, preferencesHelper);
//    }
}
